<!DOCTYPE html>
<html lang='zh-CN'>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<title>系统登录日志</title>
<link rel="icon" href="favicon.ico" type="image/ico">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/materialdesignicons.min.css" rel="stylesheet">
<link href="css/animate.css" rel="stylesheet">
<link href="css/style.min.css" rel="stylesheet">
<link href="js/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<!--日期选择插件-->
<link rel="stylesheet" href="js/bootstrap-datepicker/bootstrap-datepicker3.min.css">
</head>
<body>
<div class="container-fluid p-t-15">

  <div class="row">
    <div class="col-lg-12">
      <div class="card">
        <div class="card-header">

          <div id="toolbar" class="toolbar-btn-action">
              <form class="form-inline" method="post" id="searchForm">
                <div class="form-group">
                  <label>用户账号:</label>
                  <input type="text" class="form-control" name="account">
                </div>
                <div class="form-group">
                  <label>登录时间:</label>
                  <input type="text" class="form-control js-datepicker" data-date-format="yyyy-mm-dd" name="startTime" placeholder="开始时间"> -
                  <input type="text" class="form-control js-datepicker" data-date-format="yyyy-mm-dd" name="endTime" placeholder="结束时间">
                </div>
                <div class="form-group">
                  <button class="btn btn-info btn_query btn-round" type="button" id="searchFormBtn">查询</button>
                </div>
              </form>
          </div>

        </div>
        <div class="card-body">

          <table id="grid_data"></table>

        </div>
      </div>
    </div>

  </div>
  <script type="text/javascript" src="js/jquery.min.js"></script>
  <script type="text/javascript" src="js/bootstrap.min.js"></script>
  <script type="text/javascript" src="js/bootstrap-table/bootstrap-table.js"></script>
  <script type="text/javascript" src="js/bootstrap-table/bootstrap-table-zh-CN.min.js"></script>
  <script type="text/javascript" src="js/zero2one/zero2one.version.js"></script>
  <script type="text/javascript" src="js/zero2one/zero2one.core.js"></script>
  <!--日期选择插件-->
  <script src="js/bootstrap-datepicker/bootstrap-datepicker.min.js"></script>
  <script src="js/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js"></script>
  <!-- 调用日期插件 -->
  <script type="text/javascript" src="js/main.min.js"></script>
  <script type="text/javascript">

          //设置表头
          var columns = [
              {checkbox: true},
              {field: 'id',title: 'ID'},
              {field: 'account',title: '用户账号'},
              {field: 'login_time',title: '登录时间'},
              {field: 'login_ip',title: '登录IP'},
              {field: 'ip_address',title: 'IP地址'},
              {field: 'session_id',title: 'session_id'},
              {field: 'logout_time',title: '登出时间'},
              {field: 'os',title: '操作系统'},
              {field: 'browser',title: '登录类型'}
          ];

          //进入主界面加载数据
          zero2one.datagrid("grid_data", "/loginLogPage",function (params) {
              return $.extend(zero2one.tableInitParam(params), zero2one.form2json("searchForm"));
          }, columns);

          //点击查询按钮重新加载页面数据
          $("#searchFormBtn").click(function () {
              $('#grid_data').bootstrapTable('refresh');
          });

  </script>
</div>
</body>
</html>